package com.z.ssmdemo.log.factory;

/**
 * 日志工厂，以后需要更换日志组件在这里加就行了
 * @author haonan.zhang
 */
public class LogFactory {

    private LogFactory() {
    }

    private static class inner {
        private static final LogFactory INSTANCE = new LogFactory();
    }

    public static ELogger getLog(Class< ? > clazz) {
        //todo 可以进行判断获取那种类型的log
        LogFactory instance = inner.INSTANCE;
        return instance.getSlif4jLogger(clazz);
    }

    /**
     * 返回slf4j的代理类
     * @return
     */
    private ELogger getSlif4jLogger(Class< ? > clazz){
        return new Slif4JELoggerImpl(clazz);
    }
}
